#!/usr/bin/python
# -*- coding: UTF-8 -*-
import matplotlib.pyplot as plot
import numpy as np

r = np.empty(9)
r.fill(5)
two_pi=np.pi*2
theta = [0, two_pi/ 8, 2*two_pi/ 8, 3 * two_pi / 8, 4 *two_pi/8,5*two_pi/8,6*two_pi/8,7*two_pi/8,two_pi]
# polar 极坐标
ax = plot.subplot(111, polar=True)
ax.plot(theta, r, color="r", linewidth=3)
ax.grid(True)
plot.show()


def method2():
    r = np.empty(5)
    r.fill(5)
    theta = [0, np.pi / 2, np.pi, 3 * np.pi / 2, 2 * np.pi]
    # polar 极坐标
    ax = plot.subplot(111, polar=True)
    ax.plot(theta, r, color="r", linewidth=3)
    ax.grid(True)
    plot.show()




def photo1():
    r = np.arange(1, 6, 1)
    theta = [0, np.pi / 2, np.pi, 3 * np.pi / 2, 2 * np.pi]
    # polar 极坐标
    ax = plot.subplot(111, polar=True)
    ax.plot(theta, r, color="r", linewidth=3)
    ax.grid(True)
    plot.show()


